<?php
function inits(){
	global $CI;
	$email="lyf";
	$CI->db->where('user_name',$email);
	$query = $CI->db->get('users');
	$rs=$query->result();
	//获取分类列表
	if(isset($_GET['pid'])){
		$CI->db->where('pid',$_GET['pid']);
		$CI->db->from('class');
		$query = $CI->db->get();
		$CI->init['nav']=$query->result();
	}else{
		$CI->db->where('pid',0);
		$CI->db->from('class');
		$query = $CI->db->get();
		$CI->init['nav']=$query->result();
	}
	$CI->init['title']="我是头部";
}